package com.vst.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.vst.demo.domain.User;
import com.vst.demo.service.ILoginService;

@Controller
public class LoginController {
	@Autowired
	private ILoginService loginService;
	
	@RequestMapping(value = "login")
	private String login(User user) 
	{
		System.out.println("LoginController : Hello " + user.getUserName() + ",Your password is: " + user.getPassword());
		
		loginService.login(user);
		
		return null;
	}

}
